﻿package 
{
	import org.flixel.FlxGame;
	import States.MapState;
	
	[SWF(width="640", height="480", backgroundColor="#00aaff")]

	[Frame(factoryClass="Preloader")]
	
	/**
	 * ...
	 * @author Gregory Weir
	 */
	public class Main extends FlxGame 
	{
		//public static const SCALE_FACTOR:Number = 0.5;
		//
		//private var map:WorldScreen;
		//
		public function Main():void 
		{
			//if (stage) init();
			//else addEventListener(Event.ADDED_TO_STAGE, init);
			
			super(640, 480, MapState, 1);
		}
		//
		//private function init(e:Event = null):void 
		//{
			
			//removeEventListener(Event.ADDED_TO_STAGE, init);
			//
			//this.scaleX = SCALE_FACTOR;
			//this.scaleY = SCALE_FACTOR;
			//
			// entry point
			//map = new WorldScreen();
			//addChild(map);
			//
			//this.addEventListener(KeyboardEvent.KEY_DOWN, onKey);
			//stage.focus = this;
		//}
		//
		//private function onKey(e:KeyboardEvent):void
		//{
			//trace(e.keyCode);
			//if (e.keyCode == Keyboard.UP) map.y += 32;
			//if (e.keyCode == Keyboard.DOWN) map.y -= 32;
			//if (e.keyCode == Keyboard.LEFT) map.x += 32;
			//if (e.keyCode == Keyboard.RIGHT) map.x -= 32;
		//}
		
	}
	
}